p id="notice" = notice
h1 style="padding-bottom: 20px;" 积分汇总查询

div class="well"
  = search_form_for @q, url: admin_count_index_path, class: 'form-horizontal', :builder => SimpleForm::FormBuilder do |f|
    div class="row"
      div class="col-sm-offset-1 col-sm-5"
        = f.input :by_department, label: '机构', required: false do
          = select_tag "q[by_department]", options_for_select([['全部', '']] + get_dep_select.map {|dep| [dep.dpname, dep.id]}, @q.by_department), class: 'form-control'
      div class="col-sm-5"
        = f.input :bus_type_id_eq, label: '商户', required: false do
          = select_tag "q[bus_type_id_eq]", options_for_select([['全部', '']] + get_types.map {|dep| [dep.name, dep.id]}, @q.bus_type_id_eq), class: 'form-control'
    div class="row"
      div class="col-sm-offset-1 col-sm-5"
        = f.input :create_date_gteq, label: '开始日期', required: false
      div class="col-sm-5"
        = f.input :create_date_lteq, label: '截止日期', required: false
      div class="col-sm-offset-10 col-sm-2"
        input name="clear" value="清除" class="clear_filters_btn btn btn-warning" type="button"
        = f.button :submit, '确定', class: 'btn btn-primary'

table class="table table-striped table-hover"
  thead
    tr
      th 机构名称
      th 商户名称
  tbody
    - @colls.each do |coll|
      tr
        th = coll.dpname
